<%@page import="bean.PortfolioVo"%>
<%@page import="bean.portDTO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script src='/kiSunnyShop/js/port.js'></script>
<link rel='stylesheet' href='port.css'>

<style>
input {text-align:center;}
</style>
</head>

<body>


<%
	String sessionMid=(String)session.getAttribute("sessionMid");//object type라 형변한..sessionMid=null;java
/* 	sessionMid= "kkk"; */%>
<jsp:useBean id="vo" class="bean.PortfolioVo"/>
<jsp:setProperty property="*" name="vo"/>
<%	
	

	portDTO dto = new portDTO();
	dto.setVo(vo);	
	PortfolioVo v = dto.selectOne1();
	
	if(dto.review()){
		out.print("<h6>정상적으로 조회수 증가.</h6>");
	}else{
		out.print("<h6>조회수 증가 실패.</h6>");
	}
%>

<div>
<br/>
<h1>[<%=v.getCate()%>]<%=v.getSubject() %></h1><br/>
<%if(session.getAttribute("sessionMid")!= null){ %>
<%if(session.getAttribute("sessionMid").equals("Sunny")){%>
	 <img src='/kiSunnyShop/memberPhoto/<%=v.getPhoto()%>'><p/>
	
	<%=v.getContent()%><p/>
	작성자 : <%=v.getWriter()%><br/>

	작성날짜 : <%=v.getWdate()%><br/>
<input type='button' value='삭제' id='btnDelete'>
<input type='button' value='수정' id='btnModify'>
<input type='button' value='닫기' id='btnList'>
<%} }%>

<%if(sessionMid ==null && v.getPhoto() ==null) {%>
<%}else if (sessionMid==null && v.getPhoto() !=null){%>
 <img src='/kiSunnyShop/memberPhoto/<%=v.getPhoto()%>'><p/>
Prno:<%=v.getPrno() %></p>
Rno:<%=v.getRno() %><p/>
HIT:<%=v.getReview() %><p/>
CON:<%=v.getContent()%><p/>
작성자 : <%=v.getWriter()%><br/>

작성날짜 : <%=v.getWdate()%><br/>

<%}else if(session.getAttribute("sessionMid") !="Sunny" && sessionMid !=null){%>
 <img src='/kiSunnyShop/memberPhoto/<%=v.getPhoto()%>'><p/>
<%=v.getRno() %><p/>
<%=v.getContent()%><p/>
작성자 : <%=v.getWriter()%><br/>

작성날짜 : <%=v.getWdate()%><br/>

<%}%>

</div>
<input type="button" name="btn" id="btn" value="RNO"/>
<form id='portFrm' method="post">
	<input type='hidden' name='rno' value='<%=v.getRno()%>'>
	<input type='hidden' name='rno2' value='<%=vo.getRno()%>'>
	<input type='hidden' name='nowPage' value='<%=vo.getNowPage()%>'>
	<input type='hidden' name='find' value='<%=vo.getFind()%>'>
</form>


<script>portViewInit();</script>
</body>
</html>